﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;

namespace Evision.Zlsoft.Miaiap.Core.Model {
        //8004
        [XmlRoot("details_xml")]
        public class InputApprovalStatus {
        /// <summary>
        /// op/ip (op门诊标识，ip住院标识)
        /// </summary>
        [XmlElement("hosp_flag")]
        public string hospitalizationFlag { get; set; } = "";
        /// <summary>
        /// 门诊住院流水号
        /// </summary>
        [XmlElement("treat_code")]
        public string treatmentCode { get; set; } = "";

            [XmlArray("prescription_data")]
            [XmlArrayItem("prescription")]
            public List<SPrescription> prescriptions { get; set; }
        }

        public class SPrescription {
        /// <summary>
        /// 处方、医嘱号 (不能为空)
        /// </summary>
        [XmlElement("id")]
        public string prescriptionId { get; set; } = "";

            [XmlArray("medicine_data")]
            [XmlArrayItem("medicine")]
            public List<SMedicine> medicines { get; set; }
        }

        public class SMedicine {
        /// <summary>
        /// 项目编码 (不能为空)
        /// </summary>
        [XmlElement("his_code")]
        public string code { get; set; } = "";
        }
}

